﻿using System.Configuration;

namespace Mbs.Configuration
{
    public class ModuleSection:ConfigurationSection
    {
        public struct Constance
        {
            public const string SectionName = "Module";
            public const string Items = "items";
        }

        private static ModuleSection section;
        public static ModuleSection GetInstance()
        {
            if (section != null)
                return section;
            section = ConfigurationManager.GetSection(ModuleSection.Constance.SectionName) as ModuleSection;
            return section;
        }

        [ConfigurationProperty(Constance.Items)]
        public ModuleElementCollection Items
        {
            get { return (ModuleElementCollection)this[Constance.Items]; }
        }

    }
}
